home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / FILEBOX.HDR < prev    next >
Text File  |  1994-04-25  |  2KB  |  66 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _FileBox( nTRow, nTCol, nBRow, cFileSpec, nBoxType, cBoxColor ) --> cFileStr
  8.  
  9. PARAMETERS:
  10.  
  11. nRow      : Top Left Corner ROW of picklist box (DEFAULT: 0)
  12. nCol      : Top Left Corner COL of picklist box (DEFAULT: 0)
  13. nBRow     : Bottom Row of picklist box (DEFAULT: MaxRow())
  14. cFileSpec : file selection specification (DEFAULT: *.*)
  15. nBoxType  : Box Border Type (DEFAULT: DOUBLETOP )
  16. cBoxColor : Color string for box color (DEFAULT: current color)
  17.  
  18. SHORT:
  19.  
  20. Display picklist of specified files and return filename/ext.
  21.  
  22. DESCRIPTION:
  23.  
  24. _FileBox() presents a list of files in the current directory that
  25. match cFileSpec.  A lightbar selection selects a file and returns the
  26. file name.
  27.  
  28. nTRow and nTCol define the top left corner origins of the box. nBRow
  29. defines the bottom row where the pick list box ends.
  30.  
  31. The width is always 18 (12 for the file name, 2 for spacing, 2 for the
  32. window borders and 2 more for the box shadow - The shadow may be
  33. two characters wide depending upon the setting of the KBOXHIGH variable -
  34. See _Box() for more information).
  35.  
  36. nBoxType is a numeric that is passed to _Box().  See _Box() for information
  37. on Box Types.
  38.  
  39. cBoxColor is the color string passed to SETCOLOR() for setting the
  40. display color of the box.
  41.  
  42. _FileBox() will RETURN("") (empty string) if ESC is pressed, or if enter
  43. is pressed on a blank line.  Blank lines can exist when the number of
  44. matching files is not sufficient to fill the number of lines defined
  45. by ((nBRow-nTRow)-2).
  46.  
  47. NOTE:
  48.  
  49. See also: _FileList() for a similar function without the box drawing.
  50.  
  51. _FileList() operates similarly but provides only the raw file list with no
  52. box or labeling.  Use it when you want to draw your own box and labels with
  53. the picklist inside that.
  54.  
  55. EXAMPLE:
  56.  
  57. #define BUDGET_FILES '*.BGT'
  58.  
  59. t = _FileBox(5,5,10,BUDGET_FILES,BOXDOUBLE,'Available Budget Files')
  60.  
  61. Result: a file pick list is presented with the top corner at 5,5 and ending
  62. on line 10 (resulting in 4 lines for the file listing and two lines for
  63. the border).  When ENTER is pressed on the file, that file name is returned.
  64.  
  65. ******************************************************************************/
  66.